﻿@page "/pages/authentication/Login"
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject IAuthorizeService AuthorizeService
@inject LocalStorageJsInterop LocalStorageJsInterop

@layout EmptyLayout

<div class="d-flex align-center" style="height:calc(100% - 96px)">
    <MCard Width=510 Height=680 Class="mx-auto my-auto">
        <div style="height:60px;"></div>
        <div class="mt-2 mx-auto text-center" style="width:420px;">
            <MAvatar Size=80>
                <MImage Src="/img/avatar/1.svg">
                </MImage>
            </MAvatar>
            <h5 class="mt-2 mb-12">欢迎使用FastWiki! 👋</h5>

            <MTextField TValue="string"
                        Label="Email"
                        @bind-Value="account"
                        Placeholder="239573049@qq.com"
                        Outlined
                        HideDetails="@("auto")">
            </MTextField>
            <MTextField TValue="string"
                        Class="mt-10"
                        Label="Password"
                        @bind-Value="pass"
                        Type="@(_show ? "text" : "password")"
                        Placeholder="请输入您的密码"
                        AppendIcon="@(_show ? "mdi-eye" : "mdi-eye-off")"
                        OnAppendClick="()=>_show = !_show"
                        Outlined
                        HideDetails="@("auto")">
            </MTextField>
            <MButton Class="mt-11 rounded-4 text-btn white--text" OnClick=OnLogin Height=46 Width=340 Color="primary">登录</MButton>

        </div>
    </MCard>

</div>

<MFooter Padless Height=96 Style="background:transparent;">
    <MRow Justify="JustifyTypes.Center">
        <a href="https://beian.miit.gov.cn/" target="_blank" class="neutral-lighten-3--text" style="text-decoration:none;font-size:14px;">浙ICP备2021013592号-1</a>
    </MRow>
</MFooter>
